package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Weeds generated by hbm2java
 */
@Entity
@Table(name="weeds"
    ,catalog="madr_bd10"
)
public class Weeds  implements java.io.Serializable {


     private Integer idWee;
     private String nameWee;
     private boolean statusWee;
     private Set controlses = new HashSet(0);
     private Set monitoringPads = new HashSet(0);
     private Set cropsTypeses = new HashSet(0);
     private Set productionEventses = new HashSet(0);

    public Weeds() {
    }

	
    public Weeds(String nameWee, boolean statusWee) {
        this.nameWee = nameWee;
        this.statusWee = statusWee;
    }
    public Weeds(String nameWee, boolean statusWee, Set controlses, Set monitoringPads, Set cropsTypeses, Set productionEventses) {
       this.nameWee = nameWee;
       this.statusWee = statusWee;
       this.controlses = controlses;
       this.monitoringPads = monitoringPads;
       this.cropsTypeses = cropsTypeses;
       this.productionEventses = productionEventses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_wee", unique=true, nullable=false)
    public Integer getIdWee() {
        return this.idWee;
    }
    
    public void setIdWee(Integer idWee) {
        this.idWee = idWee;
    }
    
    @Column(name="name_wee", nullable=false, length=100)
    public String getNameWee() {
        return this.nameWee;
    }
    
    public void setNameWee(String nameWee) {
        this.nameWee = nameWee;
    }
    
    @Column(name="status_wee", nullable=false)
    public boolean isStatusWee() {
        return this.statusWee;
    }
    
    public void setStatusWee(boolean statusWee) {
        this.statusWee = statusWee;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="weeds")
    public Set getControlses() {
        return this.controlses;
    }
    
    public void setControlses(Set controlses) {
        this.controlses = controlses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="weeds")
    public Set getMonitoringPads() {
        return this.monitoringPads;
    }
    
    public void setMonitoringPads(Set monitoringPads) {
        this.monitoringPads = monitoringPads;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="weeds_crops_types", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_weed_wee_cro", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_crop_type_wee_cro", nullable=false, updatable=false) })
    public Set getCropsTypeses() {
        return this.cropsTypeses;
    }
    
    public void setCropsTypeses(Set cropsTypeses) {
        this.cropsTypeses = cropsTypeses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="weeds")
    public Set getProductionEventses() {
        return this.productionEventses;
    }
    
    public void setProductionEventses(Set productionEventses) {
        this.productionEventses = productionEventses;
    }




}


